<template>
    <div>
        <div class="location">
            <strong>当前位置:</strong>
            <span>用户管理页面 >> 用户修改页面</span>
        </div>
        <div class="supplierAdd">
            <form id="userForm" name="userForm" method="post" action="${pageContext.request.contextPath }/sys/user/update">
                <input type="hidden" name="id" value="${sysUser.id }"/>
                <div>
                    <label for="account">账号：</label>
                    <input type="text" readonly name="account" id="account" value="${sysUser.account }">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="realName">真实姓名：</label>
                    <input type="text" name="realName" id="realName" value="${sysUser.realName }">
                    <font color="red"></font>
                </div>
                <div>
                    <label >性别：</label>
                    <select name="sex" id="sex">
                        <!--                    <c:choose>-->
                        <!--                        <c:when test="${sysUser.sex == 1 }">-->
                        <!--                            <option value="1" selected="selected">女</option>-->
                        <!--                            <option value="2">男</option>-->
                        <!--                        </c:when>-->
                        <!--                        <c:otherwise>-->
                        <!--                            <option value="1">女</option>-->
                        <!--                            <option value="2" selected="selected">男</option>-->
                        <!--                        </c:otherwise>-->
                        <!--                    </c:choose>-->
                    </select>
                </div>
                <div>
                    <label for="birthday">出生日期：</label>
                    <!--                <input type="text" Class="Wdate" id="birthday" name="birthday" value="<fmt:formatDate value="${sysUser.birthday }" pattern="yyyy-MM-dd"/>"-->
                    <!--                readonly="readonly" onclick="WdatePicker();">-->
                    <font color="red"></font>
                </div>

                <div>
                    <label for="phone">手机号码：</label>
                    <input type="text" name="phone" id="phone" value="${sysUser.phone }">
                    <font color="red"></font>
                </div>
                <div>
                    <label for="address">地址：</label>
                    <input type="text" name="address" id="address" value="${sysUser.address }">
                </div>
                <div>
                    <label >角色：</label>
                    <!-- 列出所有的角色分类 -->
                    <input type="hidden" value="${sysUser.roleId }" id="rid" />
                    <select name="roleId" id="roleList"></select>
                    <!--                <%&#45;&#45;<select name="roleId" id="roleId">-->
                    <!--                <c:choose>-->
                    <!--                    <c:when test="${sysUser.roleId == 1 }">-->
                    <!--                        <option value="1" selected="selected">系统管理员</option>-->
                    <!--                        <option value="2">经理</option>-->
                    <!--                        <option value="3">普通用户</option>-->
                    <!--                    </c:when>-->
                    <!--                    <c:when test="${sysUser.roleId == 2 }">-->
                    <!--                        <option value="1">系统管理员</option>-->
                    <!--                        <option value="2" selected="selected">经理</option>-->
                    <!--                        <option value="3">普通用户</option>-->
                    <!--                    </c:when>-->
                    <!--                    <c:otherwise>-->
                    <!--                        <option value="1">系统管理员</option>-->
                    <!--                        <option value="2">经理</option>-->
                    <!--                        <option value="3" selected="selected">普通用户</option>-->
                    <!--                    </c:otherwise>-->
                    <!--                </c:choose>-->
                    <!--            </select>&#45;&#45;%>-->
                    <font color="red"></font>
                </div>
                <div class="supplierAddBtn">
                    <input type="button" name="save" id="save" value="保存" />
                    <input type="button" id="back" name="back" value="返回"/>
                </div>
            </form>
        </div>
    </div>
</template>

<script>
import {getUserById} from "@/api/user";

export default {
    name: "UpdateUser",
    data(){
        return {
            userinfo:{}
        }
    },
    mounted() {
        getUserById()
    }
}
</script>

<style scoped>
/*右边所在位置栏*/
  .location{
      height: 30px;
      line-height: 30px;
      border: 1px solid #e6eaf6;
      border-radius: 8px;
      background: linear-gradient(to bottom, #fefefe,#ffffff,#f6fafd);
      color: #4a4a4a;
      padding-left: 30px;
  }
  .location strong{
      background: url("@/assets/image/home.png") 0 center no-repeat;
      display: inline-block;
      padding-left: 30px;
  }
  .location span{
      color: #2179a9;
      font-weight:  bold;
  }
</style>
